package util;

import java.util.HashMap;
import java.util.Map;

import client.TerrainType;

public class GameConstants {
	/** Number of milliseconds in real time that a turn should last. */
	public static long turnMillis = 100;  
	/** The number of steps to use to compute object collisions in between a turn. */
	public static int miniStepsPerTurn = 100;
	
	/** The number of coords per turn that a player moves. */
	public static int moveSpeed = 1;
	
	/** The number of coords per turn that a fireball travels. */
	public static double fireballSpeed = 8; 
	/** The default collision radius of a fireball. */
	public static double fireballSize = 3;
	public static double fireballDamage = 20;
	/** The number of turns that a collision lasts on the screen. */
	public static int blastDuration = 1;
	
	public static double teleportManaCostExponent = 1.3;
	
	/** How many turns a smite cast is delayed before the lightning hits. */
	public static int smiteDelay = 15;
	public static double smiteDamage = 25;
	public static double smiteRadius = 4;
	
	public static int conflagurationDelay = 5;
	public static double conflagurationRadius = 13;
	public static double conflagurationDPT = 1.5;
	public static int conflagurationDuration = 200;
	
	public static int sentinelDuration = 50;
	/** The sentinel will shoot a fireball every this many turns. */
	public static int sentinelFireRate = 5;
	public static double sentinelShotDamage = 10;
	public static double sentinelShotSize = 3;
	public static double sentinelShotSpeed = 8;
	
	public static int hasteDuration = 50;
	public static double hasteSpeedMultiplier = 2.5;
	
	public static double magicMissileDamage = 10;
	public static double magicMissileSpeed = 3;
	public static double magicMissileSize = 1.5;
	/** The distance from an enemy that the missile will start homing. */
	public static double magicMissileHomeDistance = 35;
	/** How many radians per turn the missile will rotate. */
	public static double magicMissileHomeSpeed = 0.15;
	
	
	/** The maximum amount of mana for any mana type. */
	public static double maxMana = 100;
	/** The base fire mana cost for each spell, based on castID. */
	public static double[] fireManaCost = new double[] {2, 0, 1, 15, 25, 5, 0};
	/** The base light mana cost for each spell, based on castID. */
	public static double[] lightManaCost = new double[] {0, 0.5, 3, 0, 10, 10, 3};
	/** The base ice mana cost for each spell, based on castID. */
	public static double[] iceManaCost = new double[] {0, 0, 1, 0, 0, 0, 0};
	public static Map<TerrainType, Double> fireManaBaseRegen = new HashMap<TerrainType, Double>();
	static {
		fireManaBaseRegen.put(TerrainType.WALL, 0.0);
		fireManaBaseRegen.put(TerrainType.WATER, 0.0);
		fireManaBaseRegen.put(TerrainType.LAND, 0.5);
		fireManaBaseRegen.put(TerrainType.OUT_OF_BOUNDS, 0.0);
	}
	public static Map<TerrainType, Double> lightManaBaseRegen = new HashMap<TerrainType, Double>();
	static {
		lightManaBaseRegen.put(TerrainType.WALL, 0.0);
		lightManaBaseRegen.put(TerrainType.WATER, 0.0);
		lightManaBaseRegen.put(TerrainType.LAND, 0.5);
		lightManaBaseRegen.put(TerrainType.OUT_OF_BOUNDS, 0.0);
	}
	public static Map<TerrainType, Double> iceManaBaseRegen = new HashMap<TerrainType, Double>();
	static {
		iceManaBaseRegen.put(TerrainType.WALL, 0.0);
		iceManaBaseRegen.put(TerrainType.WATER, 0.0);
		iceManaBaseRegen.put(TerrainType.LAND, 0.0);
		iceManaBaseRegen.put(TerrainType.OUT_OF_BOUNDS, 0.0);
	}
	/** Turns after being damaged that a player will start regenerating mana. */
	public static int terrainRegenDelay = 100;
	public static int castDelay = 3;
	
	private GameConstants() {
		
	}
}
